Repository navigation
feat(schema): load 0.x datasets as 1.0 records (core tables and labels) - #307
Merged
Merged
Conversation
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 14, 2026 11:10
1a84b24 to
ae084bb
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 03:36
623f347 to
530ace7
Compare
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 15, 2026 03:36
ae084bb to
2066304
Compare
jacoblambert
marked this pull request as ready for review
October 15, 2026 06:17
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 15, 2026 08:26
630bd8b to
7013b16
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 08:26
530ace7 to
2b599d1
Compare
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 15, 2026 10:37
7013b16 to
db0ace5
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 10:37
2b599d1 to
a916c99
Compare
ktro2828
self-requested a review
October 16, 2026 08:10
ktro2828
reviewed
Oct 16, 2026
ktro2828
left a comment
Contributor
There was a problem hiding this comment.
I left one minor comment, LGTM overall. Please take a look!
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 21, 2026 01:31
a916c99 to
37155e8
Compare
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 21, 2026 01:31
db0ace5 to
2524cd7
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 22, 2026 09:48
37155e8 to
4522715
Compare
jacoblambert
force-pushed
the
v1/convert-v0-core
branch
from
October 22, 2026 09:52
2524cd7 to
1df166c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
load_dataset()(#304) now loads 0.x datasets too, best effort.V0Converter(data_root).convert()(t4_devkit/schema/v1/convert_v0.py) reads the 0.x table files and returns 1.0 table dicts. These then go through the same build, validation and shortcut fields as a 1.0 dataset.T4Tables.manifestisNonefor 0.x.Only the tables are converted, in memory. Data files are not touched: each frame keeps its own file and
frame_indexisnull.vehicle_stateand the traffic-light links come in the next PR.How the converter is written
convert_<table>method per table. Only the placeholders are a class constant (FALLBACKS).**. That's easier to review, and an unexpected 0.x key can't leak into a 1.0 record (wherefrom_dictwould fail on it).DistortionModel.from_num_coefficients, the 0.xVisibilityLevel.from_value) and reads every 0.x table file present instead of keeping a table list.Core tables
calibrated_sensor, keeping its token, sosample_data.calibrated_sensor_token→sensor_tokenis a rename.indexis in file order.sample_data(or from the first image if 0.x stored 0); distortion model from the number of coefficients (newDistortionModel.from_num_coefficients: 0 none, 4 equidistant, 5 plumb_bob, 8 rational_polynomial; anything else raises)..binfields fromV0_BIN_FIELDScut tonum_pts_feats(from the.infofile if there is one, else 5);source_channelsfrom the.infosources..binlayout and 0 frames. The next PR fills them from the concatenated channel's.infofiles.name= 0.xlog.vehicle,nullif empty, deterministic token).map_tokenfrom the 0.x map'slog_tokens.sha256computed from the osm file,projectorfrommap_projector_info.yaml. No row if the map file is missing.V0_BIN_FIELDSmoved fromdataclass/pointcloud.py(#305) tocommon/io.py, because the schema can't import fromdataclass(which imports the schema). Its fifth field is now namedchannel, the 1.0 name (0.x called itring;.binstores no names).Placeholders for values 0.x never stored
V0Converter.FALLBACKS, documented indocs/schema/v1/index.md("Loading 0.x Datasets"):"unknown", dimensions 1.0 (they must be > 0)map_id/version_id"unknown", sourcewebautolocalization, framemapis_rectifiedtrue (0.x images generally are)frame_idbase_link, undistorted, no compressionvehicle.model == "unknown"means the dimensions are placeholders and must not be used. Real vehicle values are deliberately kept out of this public repo.Labels
annotation_typeismanualunless 0.x setsautomatic_annotation. Then it isauto,provenance= theautolabel_metadatamodel names, andconfidence= the score when there is exactly one model.is_thingis false only for categories used bysurface_annand by noobject_annor instance (road, sky).indexnull(no point-wise labels yet),map_elementempty;""references →null.object_annwithinstance_tokennulland no attributes;bboxcomputed from the RLE mask with pycocotools.v0-40→ none,v40-60→ partial,v60-80→ most,v80-100→ full). 0.xunavailableand unknown levels are dropped, and boxes using them getvisibility_token: null.Schema change
sample_annotation.visibility_tokenis now nullable (null= unknown); docs updated. Real data needs it: 59 boxes across two of three downloaded datasets haveunavailablevisibility.Checked on real data
LIDAR_CONCAT.source_channels, from its.infofiles.Tests
tests/schema/v1/test_convert_v0.py, on the 0.x sample dataset:surface_annbecomes anobject_annwithout instance, with its box computed from the mask.annotation_type: auto, with the model as provenance.unavailableis dropped and becomes anullvisibility_token.tests/schema/v1/test_loader.py: the "0.x not supported yet" test is removed.